{% extends 'base.html' %}
{% load i18n %}
{% load staticfiles %}

{% block head-title %}{% trans 'Upload app release' %} - {% endblock %}

{% block head %}
    <script defer src="{% static 'public/app/upload.js' %}" type="text/javascript"></script>
{% endblock %}

{% block content %}
    <div class="app-form">
        <h1>{% trans 'Upload app release' %}</h1>
        <hr>
        <div id="form-success" class="alert alert-success" hidden>{% trans 'App release successfully uploaded.' %}</div>
        <p>{% blocktrans %}For more information on how to create the signature check out the <a href="https://nextcloudappstore.readthedocs.io/en/latest/developer.html" rel="noopener norefferer">app developer guide</a>.{% endblocktrans %}</p>
        <form id="app-upload-form" method="post" action="{% url 'api:v1:app-release-create' %}">
            <span data-l10n-id="msg-form-success" hidden>{% trans 'App release successfully uploaded.' %}</span>
            <div><div class="alert alert-success global-success-msg" hidden></div></div>
            <div><div class="alert alert-danger global-error-msg" hidden></div></div>

            {% csrf_token %}
            {% include 'form-fields.html' %}

            <input type="submit" id="submit" class="btn btn-primary btn-block" value="{% trans 'Upload' %}">
        </form>
    </div>
{% endblock %}
